package x.ovo.wechat.bot.common.event;

import lombok.Getter;
import lombok.Setter;
import x.ovo.wechat.bot.common.Context;

import java.util.EventObject;

/**
 * 事件基类
 *
 * @author ovo, created by 2024/05/01
 */
@Setter@Getter
@SuppressWarnings("unchecked")
public abstract class Event<T> extends EventObject {

    private Context context;

    public Event(T source) {
        super(source);
    }

    @Override
    public T getSource() {
        return (T) super.getSource();
    }
}
